﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Areas/Admin/Views/Shared/MainContent.Master"
    Inherits="System.Web.Mvc.ViewPage<IEnumerable<MShop.Core.Domain.Product>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    产品广告管理
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<% MShop.Web.Controllers.ControllerBase cb = this.ViewContext.Controller as MShop.Web.Controllers.ControllerBase; %>
    <% using (Html.BeginForm("showproductad", "productad", FormMethod.Post, new { @target = "_blank" }))
       {%>
    <div id="fullBox">
        <div class="tabListBoxHead">
            <div style="float: left; padding-top: 3px;">
                <img src="/Content/add.png" width="16" height="16" border="0" align="absmiddle" style="margin-right: 3px;" />
                产品广告管理
            </div>
            <div style="float: right;">
            </div>
        </div>
        <div class="productad">
            <ul>
                <% foreach (var item in Model)
                   { %>
                <li>
                    <%=Html.ActionImageLink(item.ThumbImageUrl, "item", "product", new { area = "" }, new { @target = "_blank", @class = "thumb" })%>
                    <p>
                        <%=item.ProductName%><%=Html.ActionImageLink("/Content/remove.png", "delete", new { id = item.Id }, new { @onclick = "return confirm('确认该产品不需要放入广告代码中吗？')" })%>
                    </p>
                </li>
                <%} %>
            </ul>
            <div style="clear: both;">
            选项：价格<input type="checkbox" name="price" />产地<input type="checkbox" name="region" />
                <input type="submit" class="btn" value="生成HTML代码" />
            </div>            
        </div>
    </div>
    <%} %>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cphMeta" runat="server">
    <script type="text/javascript">
        $(document).ready(function () {
            var windowWidth = $("#fullBox").width();
            var windowHeight = $("#fullBox").height() - 310;
            $('.tabListBox').css({ 'width': windowWidth + 'px', 'height': windowHeight + 'px' });
            $(window).resize(function () {
                var windowWidth = $("#fullBox").width();
                var windowHeight = $("#fullBox").height() - 310;
                $('.tabListBox').css({ 'width': windowWidth + 'px', 'height': windowHeight + 'px' });
            });


        });
    </script>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="cphFooter" runat="server">
</asp:Content>
